/*
 * Copyright 2011 Drew Wilder-Goodwin
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */
#ifndef SOUND_TAB_DIALOG_H
#define SOUND_TAB_DIALOG_H

/* Dialog controls */
#define DLG_SND_DRV_GB (DLG_SOUND_START+0)
#define DLG_SND_DEV_GB (DLG_SOUND_START+1)
#define DLG_SND_DIRX_GB (DLG_SOUND_START+2)
#define DLG_SND_NOTES_GB (DLG_SOUND_START+3)
#define DLG_SND_NOTES (DLG_SOUND_START+4)
#define DLG_SND_DIRX_HSAL_LBL (DLG_SOUND_START+5)
#define DLG_SND_DIRX_SLIDER (DLG_SOUND_START+6)
#define DLG_SND_DIRX_BA_LBL (DLG_SOUND_START+7)
#define DLG_SND_DIRX_BTN (DLG_SOUND_START+8)
#define DLG_SND_DEV_NAME_LBL (DLG_SOUND_START+9)
#define DLG_SND_DEV_DEV_ID_LBL (DLG_SOUND_START+10)
#define DLG_SND_DEV_MANID_LBL (DLG_SOUND_START+11)
#define DLG_SND_DEV_PRODID_LBL (DLG_SOUND_START+12)
#define DLG_SND_DEV_TYPE_LBL (DLG_SOUND_START+13)
#define DLG_SND_DEV_DEF_LBL (DLG_SOUND_START+14)
#define DLG_SND_DEV_NAME (DLG_SOUND_START+15)
#define DLG_SND_DEV_DEV_ID (DLG_SOUND_START+16)
#define DLG_SND_DEV_MANID (DLG_SOUND_START+17)
#define DLG_SND_DEV_PRODID (DLG_SOUND_START+18)
#define DLG_SND_DEV_TYPE (DLG_SOUND_START+19)
#define DLG_SND_DEV_DEF (DLG_SOUND_START+20)
#define DLG_SND_DRV_NAME_LBL (DLG_SOUND_START+21)
#define DLG_SND_DRV_NAME (DLG_SOUND_START+22)
#define DLG_SND_DRV_VER_LBL (DLG_SOUND_START+23)
#define DLG_SND_DRV_VER (DLG_SOUND_START+24)
#define DLG_SND_DRV_DATE_LBL (DLG_SOUND_START+25)
#define DLG_SND_DRV_DATE (DLG_SOUND_START+26)
#define DLG_SND_DRV_WHQL_LBL (DLG_SOUND_START+27)
#define DLG_SND_DRV_WHQL (DLG_SOUND_START+28)
#define DLG_SND_DRV_OTHER_LBL (DLG_SOUND_START+29)
#define DLG_SND_DRV_OTHER (DLG_SOUND_START+30)
#define DLG_SND_DRV_PRV_LBL (DLG_SOUND_START+31)
#define DLG_SND_DRV_PRV (DLG_SOUND_START+32)
#define DLG_SOUND (DLG_SOUND_START+33)

/* Dialog strings */
#define STRING_DLG_SND_DEV_GB (DLG_SOUND_STRING_START+0)
#define STRING_DLG_SND_DRV_GB (DLG_SOUND_STRING_START+1)
#define STRING_DLG_SND_DIRX_GB (DLG_SOUND_STRING_START+2)
#define STRING_NOTES (DLG_SOUND_STRING_START+3)
#define STRING_DLG_SND_DEV_NAME (DLG_SOUND_STRING_START+4)
#define STRING_DLG_SND_DEV_DEVID (DLG_SOUND_STRING_START+5)
#define STRING_DLG_SND_DEV_MANID (DLG_SOUND_STRING_START+6)
#define STRING_DLG_SND_DEV_PRDID (DLG_SOUND_STRING_START+7)
#define STRING_DLG_SND_DEV_TYPE (DLG_SOUND_STRING_START+8)
#define STRING_DLG_SND_DEV_DEF (DLG_SOUND_STRING_START+9)
#define STRING_DLG_SND_DRV_NAME (DLG_SOUND_STRING_START+10)
#define STRING_DLG_SND_DRV_VER (DLG_SOUND_STRING_START+11)
#define STRING_DLG_SND_DRV_DATE (DLG_SOUND_STRING_START+12)
#define STRING_DLG_SND_DRV_WHQL (DLG_SOUND_STRING_START+13)
#define STRING_DLG_SND_DRV_OTHER (DLG_SOUND_STRING_START+14)
#define STRING_DLG_SND_DRV_PROV (DLG_SOUND_STRING_START+15)
#define STRING_DLG_SND_ACCLEVELS (DLG_SOUND_STRING_START+16)
#define STRING_DLG_SND_ACC1 (DLG_SOUND_STRING_START+17)
#define STRING_DLG_SND_ACC2 (DLG_SOUND_STRING_START+18)
#define STRING_DLG_SND_ACC3 (DLG_SOUND_STRING_START+19)
#define STRING_DLG_SND_ACC4 (DLG_SOUND_STRING_START+20)
#define STRING_DLG_SND_TEST (DLG_SOUND_STRING_START+21)
#define STRING_DLG_SND_ACCINVALID (DLG_SOUND_STRING_START+22)
#define STRING_DLG_SND_HSAL_ERROR (DLG_SOUND_STRING_START+23)

/* Don't include below in the RC compilation */
#ifndef RC_INVOKED
#include "resources.h"
#include "dxdiagcom.h"
#include "tab.h"
#include <windows.h>

/* Slider */
#define DLG_SND_ACCLEVELMIN 0
#define DLG_SND_ACCLEVELMAX 3

/* Context information */
typedef struct {
    DxDiag_SoundDevice *soundDevice;
    long accelerationLevel;
    BOOL handlingHSALChange;
} SoundTabContext;

/* Function declarations */
VOID resize_sound_tab(HWND hSoundTab, RECT tabDisplayArea);
VOID create_sound_tab(Tab * tab, DxDiag_SoundDevice * soundDevice);

#endif
#endif
